﻿using AngryManagementMayhem.Content.Textures.MainMenu;
using Transformable_Engine_v2.Engine.GameObjects.Containers;
using Transformable_Engine_v2.Engine.GameObjects.Containers.Transformable_controls;
using Transformable_Engine_v2.Engine.GameObjects.Primitives;
using Transformable_Engine_v2.Engine.Graphics;
using Transformable_Engine_v2.Engine.Transformable_Math.Geometry;

namespace AngryManagementMayhem.GameCode.Screens.MainMenuScreen.MainMenuObjects
{
    public class GameModeDescription : Container
    {
        private Label _title;
        private Label _subtitle;

        public GameModeDescription()
        {
            AddChildren(new RectanglePrimitive
            {
                Shape = new TE_Rectangle(0, 0, 26, 2),
                FillColor = new Color(0, 74, 127),
                OutlineColor = Color.White,
                OutlineThickness = 2
            });
            _title = new Label(MainMenuSpriteSheet.GetSprite, "")
            {
                PositionGridBound = new TE_Vector2(0.5f, 1),
                TextAlign = TE_Rectangle.Alignment.CenterLeft
            };
            _subtitle = new Label(MainMenuSpriteSheet.GetSprite, "")
            {
                PositionGridBound = new TE_Vector2(0.5f, 3),
                TextAlign = TE_Rectangle.Alignment.TopLeft
            };
            AddChildren(_title, _subtitle);

            AddChildren(new RectanglePrimitive
            {
                Shape = new TE_Rectangle(0, 2, 26, 18),
                FillColor = Color.Transparent,
                OutlineColor = Color.White,
                OutlineThickness = 2
            });
        }

        public void ChangeText(string title, string[] subtitle)
        {
            _title.SetText(title);
            _subtitle.SetText(subtitle);
        }
    }
}